import { AppComponent } from './app.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HeaderComponent } from './components/header/header.component';
import { FooterComponent } from './components/footer/footer.component';
import { HomeComponent } from './components/home/home.component';
import { NavComponent } from './components/nav/nav.component';
import { SameTempComponent } from './components/same-temp/same-temp.component';




const routes: Routes = [
{
  path:'home',
  component:HomeComponent
},
// {
//   path:'sameContent/:id',
//   component:SameTempComponent
// },
 {
   path:'menu/:id',
   component:SameTempComponent
  //  pathMatch:'prefix'
 },
 {
   path:'news/:id',
   component:SameTempComponent
  //  pathMatch:'prefix'
 },{
   path:'sytzGsyj/:id',
   component:SameTempComponent
 },
 {
   path:'map',
   component:SameTempComponent
 },
 {
   path:'introduce/:id',
   component:SameTempComponent
 },
{
  path:'',
  component:HomeComponent
},
// {
//   path:'**',
//   // pathMatch: 'full',
//   redirectTo:'home'
// }
];

@NgModule({
  imports: [RouterModule.forRoot(routes,{useHash:true})],
  exports: [RouterModule]
})
export class AppRoutingModule { }
